﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace EFong.Contract
{
    [DataContract]
    public class IntergralExchange
    {
        private Guid _id = Guid.NewGuid();
        [DataMember]
        public Guid ID
        {
            get { return _id; }
            set { _id = value; }
        }

        private Customer _customer;
        [DataMember]
        public Customer Customer
        {
            get { return _customer; }
            set { _customer = value; }
        }

        private string _customerText = string.Empty;
        [DataMember]
        public string CustomerText
        {
            get { return _customerText; }
            set { _customerText = value; }
        }

        private DateTime _date = DateTime.Now;
        [DataMember]
        public DateTime Date
        {
            get { return _date; }
            set { _date = value; }
        }

        private string _item = string.Empty;
        [DataMember]
        public string Item
        {
            get { return _item; }
            set { _item = value; }
        }

        private int _qty;
        [DataMember]
        public int Qty
        {
            get { return _qty; }
            set { _qty = value; }
        }

        private decimal _amount;
        [DataMember]
        public decimal Amount
        {
            get { return _amount; }
            set { _amount = value; }
        }

        private string _receiptor = string.Empty;
        [DataMember]
        public string Receiptor
        {
            get { return _receiptor; }
            set { _receiptor = value; }
        }

        private string _remark = string.Empty;
        [DataMember]
        public string Remark
        {
            get { return _remark; }
            set { _remark = value; }
        }

        public override bool Equals(object obj)
        {
            IntergralExchange temp = obj as IntergralExchange;
            if (temp == null)
                return false;
            return (this.ID.Equals(temp.ID));
        }
    }
}
